package cn.huolabao.feign;

import cn.huolabao.dto.JwtTokenDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leechee-authorization", decode404 = true)
public interface OAuth2Client {
    @PostMapping("/oauth/token")
    ResponseEntity<JwtTokenDto> getToken(@RequestParam("grant_type") String grantType,
                                         @RequestParam("username") String username,
                                         @RequestParam("password") String password,
                                         @RequestParam("client_id") String client_id,
                                         @RequestParam("client_secret") String client_secret);
}
